package controllers;

import dbaccessors.DBAccessor;

/**
 * Implemented as a singleton.
 * 
 */

public class CardController {

	private static CardController instance = null;

	private CardController() {
	}

	public static CardController getInstance() {
		if (instance == null) {
			instance = new CardController();
		}
		return instance;
	}

	public boolean addToTradeList(int cardID, String username) {
		System.out.println("CardController: addToTradeList");
		return DBAccessor.getInstance().addToTradeList(cardID, username);
	}

	public boolean removeFromTradeList(int cardID, String username) {
		System.out.println("CardController: removeFromTradeList");
		return DBAccessor.getInstance().removeFromTradeList(cardID, username);
	}

	public boolean addToWishList(int cardID, String username) {
		System.out.println("CardController: addToWishList");
		return DBAccessor.getInstance().addToWishList(cardID, username);
	}

	public boolean removeFromWishList(int cardID, String username) {
		System.out.println("CardController: removeFromWishList");
		return DBAccessor.getInstance().removeFromWishList(cardID, username);
	}

	// methods

	/*
	 * public boolean addToWishlist(String username, int cid) { // TODO return
	 * false; }
	 * 
	 * public boolean addToTradelist(String username, int iid) { // TODO return
	 * false; }
	 * 
	 * public boolean removeFromWishlist(String username, int cid) { // TODO
	 * return false; }
	 * 
	 * public boolean removeFromTradelist(String username, int iid) { // TODO
	 * return false; }
	 * 
	 * public boolean trade(String username1, String username2, int iid1, int
	 * iid2) { // TODO return false; }
	 * 
	 * public boolean addCardToUser(String username, int iid) { // TODO return
	 * false; }
	 * 
	 * public boolean removeCardFromUser(String username, int iid) { // TODO
	 * return false; }
	 * 
	 * public ArrayList<CardTemplate> getWishlist(String username) { // TODO
	 * return null; }
	 * 
	 * public ArrayList<CardInstance> getTradeList(String username) { // TODO
	 * return null; }
	 * 
	 * public CardInstance getCardDetails(int iid) { // TODO return null; }
	 * 
	 * public boolean pasteCard(int iid, int aid, String username, int cell) {
	 * // TODO return false; }
	 * 
	 * public boolean unpasteCard(int iid, int aid, String username, int cell) {
	 * // TODO return false; }
	 */
}
